require.config({
    baseUrl: "plugins/kendo", // the path where the kendo scripts are present
    paths: {
        "jquery": "../jQuery/jquery-2.2.3.min",
        "jquery-ui": "../jQueryUI/jquery-ui.min",
        "bootstrap": "../../bootstrap/js/bootstrap.min",
        "raphael": "../raphael/raphael.min",
        "morris": "../morris/morris.min",
        "sparkline": "../sparkline/jquery.sparkline.min",
        "jvectormap": "../jvectormap/jquery-jvectormap-1.2.2.min",
        "jvectormap-en": "../jvectormap/jquery-jvectormap-world-mill-en",
        "knob": "../knob/jquery.knob",
        "moment": "../moment/moment.min",
        "daterangepicker": "../daterangepicker/daterangepicker",
        "datepicker": "../datepicker/bootstrap-datepicker",
        "bootstrap-wysihtml5": "../bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min",
        "slimscroll": "../slimScroll/jquery.slimscroll.min",
        "fastclick": "../fastclick/fastclick",
        "app": "../../styles/js/app",
        "dashboard": "../../styles/js/pages/dashboard",
        "demo": "../../styles/js/demo",
        "theme-chooser": "../../styles/js/theme-chooser"
    },
    shim: {
        "bootstrap": { deps: ["jquery"] },
        "slimscroll": { deps: ["jquery"] },
        "app": { deps: ["jquery", "bootstrap"] },
        "demo": { deps: ["jquery"] },
        "theme-chooser": { deps: ["jquery","kendo.data","kendo.listview"] }
    }
});
require(["jquery", "bootstrap", "slimscroll", "fastclick", "app", "demo"], function() {
    require(["jquery","kendo.notification"],function ($,kendo) {
        // 修改密码
        $("[data-toggle='rest']").on('click',function () {
            var sel = $(this).attr('data-target');
            var form = $(sel).find('form');
            $.ajax({
                type: form.attr('method'),
                url:form.attr('action'),
                data:form.serialize(),
                success: function(data) {
                    $("#notification").kendoNotification({
                        allowHideAfter: 1000
                    }).data("kendoNotification").show(data.message,"info");
                }
            });
        });
    });
    require(["jquery","kendo.remote.view","kendo.dropdownlist","theme-chooser"], function($, kendo) {
        new kendo.RemoteView().batch(".sidebar-menu li a",".box-body").start();
    });
});